package edu.sctu.zcy.month201506.day20150611;

import java.io.*;

/**
 * Created by user24 on 2015/6/11.
 */
public class TxtFileReadOrWriteDemo {

    public static void main(String[] args) throws IOException {


        File inputFile = new File("D:\\ZCY\\zcy.txt");
        File outputFile = new File("D:\\ZCY\\zcy1.txt");

        FileReader in = new FileReader(inputFile);
        FileWriter out = new FileWriter(outputFile);

        int c;
        while ((c = in.read()) != -1){

            out.write(c);
        }

        in.close();
        out.close();
        System.out.println("成功创建zcy1.txt文件");
    }
}